<p>Compiling Apache requires the following environment to be
properly installed:</p>
<ul>
<li>
<p>Disk Space</p>
<p>Make sure you have at least 50 MB of free disk space
available. After installation Apache requires approximately
10 MB of disk space, plus space for log and cache files,
which can grow rapidly. The actual disk space requirements
will vary considerably based on your chosen configuration and
any third-party modules or libraries.</p>
</li>
<li>
<p>Microsoft Visual C++ 5.0 or higher.</p>
<p>Apache can be built using the command line tools, or from
within the Visual Studio IDE Workbench. The command line
build requires the environment to reflect the <code>PATH</code>,
<code>INCLUDE</code>, <code>LIB</code> and other variables
that can be configured with the <code>vcvars32</code> batch file:</p>
<div class="example"><p><code>
"c:\Program Files\DevStudio\VC\Bin\vcvars32.bat"
</code></p></div>
</li>
<li>
<p>The Windows Platform SDK.</p>
<p>Visual C++ 5.0 builds require an updated Microsoft Windows
Platform SDK to enable some Apache features. For command line
builds, the Platform SDK environment is prepared by the
<code>setenv</code> batch file:</p>
<div class="example"><p><code>
"c:\Program Files\Platform SDK\setenv.bat"
</code></p></div>
<p>The Platform SDK files distributed with Visual C++ 6.0 and
later are sufficient, so users of later version may skip
this requirement.</p>
<div class="note">Note that the Windows Platform SDK update is required
to enable all supported <code class="module"><a href="../mod/mod_isapi.html">mod_isapi</a></code> features.
Without a recent update, Apache will issue warnings under
MSVC++ 5.0 that some <code class="module"><a href="../mod/mod_isapi.html">mod_isapi</a></code> features
will be disabled. Look for the update at <a href="http://msdn.microsoft.com/downloads/sdks/platform/platform.asp">http://msdn.microsoft.com/downloads/sdks/platform/platform.asp</a>.</div>
</li>
<li>
<p>The awk utility (awk, gawk or similar).</p>
<p>To install Apache within the build system, several files are
modified using the <code>awk.exe</code> utility. awk was chosen since it
is a very small download (compared with Perl or WSH/VB) and
accomplishes the task of generating files. Brian Kernighan's
<a href="http://cm.bell-labs.com/cm/cs/who/bwk/awk95.exe">http://cm.bell-labs.com/cm/cs/who/bwk/awk95.exe</a> which
you must save with the name <code>awk.exe</code> rather than
<code>awk95.exe</code>.</p>
<div class="note">Note that Developer Studio IDE will only find
<code>awk.exe</code> from the Tools menu Options... Directories
tab (the Projects - VC++ Directories pane in Developer Studio 7.0)
listing Executable file paths. Add the path for <code>awk.exe</code>
to this list, and your system <code>PATH</code> environment variable,
as needed.</div>
<div class="note">Also note that if you are using Cygwin (<a href="http://www.cygwin.com/">http://www.cygwin.com/</a>) the awk utility is named <code>gawk.exe</code> and
that the file <code>awk.exe</code> is really a symlink to the <code>gawk.exe</code>
file. The Windows command shell does not recognize symlinks, and because of that
building InstallBin will fail. A workaround is to delete <code>awk.exe</code> from
the cygwin installation and rename <code>gawk.exe</code> to <code>awk.exe</code>.</div>
<p><strong>Caution: there are significant restrictions and
prohibitions on the use and distribution of strong cryptography
and patented intellectual property throughout the world.</strong>
OpenSSL includes strong cryptography controlled by both export
regulations and domestic law, as well as intellectual property
protected by patent, in the United States and elsewhere. Neither
the Apache Software Foundation nor the OpenSSL project can provide
legal advise regarding possession, use, or distribution of the code
provided by the OpenSSL project. <strong>Consult your own legal
counsel, you are responsible for your own actions.</strong></p>
<p>OpenSSL must be installed into a <code>srclib</code> subdirectory named
<code>openssl</code>, obtained from <a href="http://www.openssl.org/source/">http://www.openssl.org/source/</a>, in order to compile <code class="module"><a href="../mod/mod_ssl.html">mod_ssl</a></code>
or the abs project (<code>ab.exe</code> with SSL support.) To prepare OpenSSL
for both <code>release</code> and <code>debug</code> builds of Apache, and
disable the patent protected features in 0.9.7, you might use the following
<p>Zlib must be installed into a <code>srclib</code> subdirectory named
<code>zlib</code>, however those sources need not be compiled. The build system
will compile the compression sources directly into the <code class="module"><a href="../mod/mod_deflate.html">mod_deflate</a></code>
module. Zlib can be obtained from <a href="http://www.gzip.org/zlib/">http://www.gzip.org/zlib/</a> -- <code class="module"><a href="../mod/mod_deflate.html">mod_deflate</a></code> is
confirmed to build correctly with version 1.1.4.</p>
<li><code><em>dir</em>\include</code> - C language header
files</li>
<li><code><em>dir</em>\lib</code> - Link library files</li>
</ul>
<h3><a name="projectcomponents-warn" id="projectcomponents-warn">Warning about building Apache from the development tree</a></h3>
<div class="note">Note only the <code>.dsp</code> files are maintained between <code>release</code>
builds. The <code>.mak</code> files are NOT regenerated, due to the tremendous
waste of reviewer's time. Therefore, you cannot rely on the <code>NMAKE</code>
commands above to build revised <code>.dsp</code> project files unless you
then export all <code>.mak</code> files yourself from the project. This is
unnecessary if you build from within the Microsoft
Developer Studio environment.</div>
<div class="note">Also note it is very worthwhile to build the <code>BuildBin</code>
target project (or the command line <code>_apacher</code> or
<code>_apached</code> target) prior to exporting the make files.
Many files are autogenerated in the build process. Only a full
build provides all of the dependent files required to build proper
dependency trees for correct build behavior.</div>
<p>In order to create distribution <code>.mak</code> files, always review
the generated <code>.mak</code> (or <code>.dep</code>) dependencies for
Platform SDK or other garbage includes. The <code>DevStudio\SharedIDE\bin\</code>
(VC5) or <code>DevStudio\Common\MSDev98\bin\</code> (VC6) directory contains
the <code>sysincl.dat</code> file, which must list all exceptions. Update this
file (including both forward and backslashed paths, such as both
<code>sys/time.h</code> and <code>sys\time.h</code>) to include such dependencies.
Including local-install paths in a distributed <code>.mak</code> file will
cause the build to fail completely. And don't forget to run
<code>srclib/apr/build/fixwin32mak.pl</code> in order to fix absolute
paths within the <code>.mak</code> files.</p>
</div></div>
<div class="bottomlang">
<p><span>Available Languages: </span><a href="../en/platform/win_compiling.html" title="English"> en </a> |
<a href="../ko/platform/win_compiling.html" hreflang="ko" rel="alternate" title="Korean"> ko </a></p>
</div><div id="footer">
<p class="apache">Copyright 1995-2006 The Apache Software Foundation or its licensors, as applicable.<br />Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>